<?php
$this->beginWidget('system.web.widgets.CClipWidget', array('id'=>'cl-nav'));
?>
<table style="width: auto">
<tr>
	<td>
	<?php 
		$data = array();
		$data[]	= array('label'=>'Tạo mới Bill', 'url'=>Yii::app()->createUrl('/bill/bill/create'), "visible"=>Yii::app()->user->checkAccess("Bill@BillCreate", Yii::app()->user->Id));
		$data[]	= array('label'=>'Sửa Bill', 'url'=>Yii::app()->createUrl('/bill/bill/view'), "visible"=>Yii::app()->user->checkAccess("Bill@BillAdmin", Yii::app()->user->Id));
		if($data[0]['visible'] || $data[1]['visible']){
			$this->widget('bootstrap.widgets.TbButtonGroup', array(
					'type'=>'success',
					'buttons'=>array(
							array('label'=>'Quản lý Bill', 'items'=>$data),
					),
			));
		}
	?>
	</td>
	<td>
	<?php 
		$this->widget('bootstrap.widgets.TbButton', array(
		    'label'=>Yii::t('main', 'Kết quả phát'),
		    'type'=>'success',
			'icon'=>'search white',
		    'url'=>Yii::app()->createUrl('/bill/billDetail/create'),
			'htmlOptions'=>array('class'=>'search-button')
		));
	?>
	</td>
	<td>
	<?php 
		$data = array();
		$data[]	= array('label'=>'Tra cứu Track', 'url'=>Yii::app()->createUrl('/bill/track'), "visible"=>Yii::app()->user->checkAccess("Bill@TrackIndex", Yii::app()->user->Id),);
		$data[]	= array('label'=>'Sản lượng và Doanh thu', 'url'=>Yii::app()->createUrl('/bill/report/index'),"visible"=>Yii::app()->user->checkAccess("Bill@ReportIndex", Yii::app()->user->Id),);
		if($data[0]['visible'] || $data[1]['visible']){
			$this->widget('bootstrap.widgets.TbButtonGroup', array(
					'type'=>'success',
					'buttons'=>array(
							array('label'=>'Tra cứu', 'items'=>$data),
					),
			));
		}
	?>
	</td>
</tr>
</table>
<?php 
$this->endWidget();

$this->beginContent('webroot.themes.layouts.column2');
echo $content;
$this->endContent();
?>